package per.dg.jingchess.views.base;

import android.os.Bundle;
import android.util.Log;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

import per.dg.jingchess.App;

public class BaseActivity extends AppCompatActivity {

    public static boolean isShow = true;

    public boolean music;
    public boolean sounds;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }

    @Override
    protected void onResume() {
        super.onResume();
        ((App)getApplication()).startBgm();
        isShow = true;
    }

    @Override
    protected void onStop() {
        super.onStop();
        if(!isShow)
        ((App)getApplication()).stopBgm();
        else
        isShow = !isShow;
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
    }
}
